package xtu.www.androidmodule;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

import xtu.www.common.base.BaseApplication;
import xtu.www.common.router.Router;
import xtu.www.common.router.rule.ActivityRule;
import xtu.www.module.a.ModuleAActivity;
import xtu.www.module.b.ModuleBActivity;

/**
 * Created by huilin on 2017/6/15.
 */

public class App extends BaseApplication {
    @Override
    public void onCreate() {
        super.onCreate();

        Router.route(ActivityRule.ACTIVITY_SCHEME + "module_b", ModuleBActivity.class);
        Router.route(ActivityRule.ACTIVITY_SCHEME + "module_a", ModuleAActivity.class);
        try {
            Class aClass = Class.forName("xtu.mo.Route_Register");
            Method method = aClass.getMethod("register");
            method.invoke(null, (Object[]) null);
        }catch (ClassNotFoundException e) {
            e.printStackTrace();
        } catch (NoSuchMethodException e) {
            e.printStackTrace();
        } catch (InvocationTargetException e) {
            e.printStackTrace();
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        }
    }
}
